﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="Customer.cs" company="Spenta Consulting">
//   (c) Copyright 2011
// </copyright>
// <summary>
//   Defines the Customer type.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace Spenta.StreetCare.Silverlight.StreetCareAPI
{
    using Microsoft.Maps.MapControl;

    /// <summary>
    /// Defines the Customer type.
    /// </summary>
    public partial class Customer
    {
        /// <summary>
        /// Gets a value indicating whether the customer is loaded.
        /// </summary>
        /// <value><c>true</c> if the customer is loaded; otherwise, <c>false</c>.</value>
        public bool IsLoaded
        {
            get { return !string.IsNullOrEmpty(CustomerLogoUrl); }
        }

        /// <summary>
        /// Gets the map location.
        /// </summary>
        /// <value>The map location.</value>
        public Location CustomerMapLocation
        {
            get
            {
                return new Location(CustomerLatitude, CustomerLongitude);
            }
        }
    }
}
